package com.example.admin.api;


import com.example.admin.service.EmployeeService;
import com.example.admin_model.dto.EmployeeDTO;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: sjz
 * @since: 2024/7/3 19:46
 */
@Slf4j
@RestController
@RequestMapping("/employeeApi")
public class EmployeeApi {

    @Resource
    private EmployeeService employeeService;

    @PostMapping("validate")
    public String validate(@RequestBody EmployeeDTO employeeDTO) {
        String id = employeeService.validate(employeeDTO.getToken());
        return id;
    }
}
